home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / hardware / ide-fix / installsoftware < prev    next >
Text File  |  1997-12-06  |  33KB  |  1,245 lines

  1. ;$VER: IDEfix Install 49.1 (30.11.97)
  2. ;Copyright ©1993-1997 Elaborate Bytes, Oliver Kastl
  3.  
  4. ( set #ControlDefault 1 )
  5.  
  6. (onerror
  7.     (makeassign "CacheCDFSInst" (safe))
  8.     (makeassign "CacheCDFS" (safe))
  9. )
  10.  
  11. (set #autoMount 1)
  12. (set #CDDevice_NC "CD" )
  13. (set #instEjectCD 1)
  14. (set #instEject 1)
  15. (set #ReplaceOld 1 )
  16. (set #DeleteOld 1 )
  17.  
  18. (set #wbversion (getversion "libs:version.library"))
  19. (set #wbversion (/ #wbversion 65536) )
  20.  
  21. (complete 0)
  22.  
  23. (if (< #wbversion 37)
  24.     (abort "\n\nAmigaDOS 2.04 or higher is required for CacheCDFS! "
  25.              "\n\nAn upgrade will be needed for your Amiga." )
  26. )
  27.  
  28.  
  29. ;(if (< (getdiskspace "SYS:") 409600)
  30. ;    (abort "\n\nApproximately 400K of disk space is needed on your SYS: volume."
  31. ;             "\n\nYou only have " (/ (getdiskspace "SYS:") 1024)    "K free.\n\n"
  32. ;             "Delete or transfer some files from the SYS: volume and try again." )
  33. ;)
  34.  
  35. (makeassign "CacheCDFSInst" "" ( safe) )
  36.  
  37.  
  38. (set #theirlevel @user-level )
  39.  
  40. (set #Match ( run "CacheCDFSInst:CheckIDEfix" ( safe ) ) )
  41.  
  42. (user 2)
  43.  
  44. (message "\nWelcome to IDE-fix, CacheCDFS2, CD32-Emulator and PlayCD!"
  45.             "\n\nThis package is the complete solution for all your IDE and CD-ROM problems! " 
  46.          "\n\n"
  47.          "IDEfix allows you to use 4 harddisks and SyQuest drives with your IDE port, "
  48.          "ATAPI controls IDE CD-Roms, "
  49.          "CacheCDFS, PlayCD and CD32-Emulator power any IDE or SCSI-II CD-Rom!"
  50.          "\n\nEnjoy it! " )
  51.  
  52.  
  53. ( if (NOT @pretend )
  54.    (
  55.    (if ( run "CacheCDFSInst:Register/Register" )
  56.        (
  57.        (abort)
  58.        )
  59.     )
  60. ))
  61.  
  62. (set #DefaultDir
  63.     (askdir
  64.         (prompt "\n\nSpecify the place, where the IDEfix97 directory will be created:" )
  65.         (help "\n\nIDE-fix and CacheCDFS contain a number of support programs. "
  66.         "This directory will specifiy where the IDEfix97 directory will be placed.")
  67.         (default @default-dest)
  68.         (newpath)
  69.     )
  70. )
  71.  
  72. (user #theirlevel)
  73.  
  74. (set #CDFSDir (tackon #DefaultDir "IDEfix97"))
  75.  
  76. (if (NOT (exists #CDFSDir ))
  77.     (
  78.     (makedir #CDFSDir
  79.         (safe)
  80.         (infos)
  81.     )
  82.     )
  83. )
  84.  
  85. (set @default-dest #CDFSDir)
  86.  
  87.  
  88. (makeassign "CacheCDFS" #CDFSDir (safe))
  89.  
  90. (copyfiles
  91.     (source "CacheCDFSInst:C/UnInstall")
  92.     (prompt )
  93.     (help )
  94.     (infos)
  95.     (dest "CacheCDFS:")
  96. )
  97.  
  98. (if (NOT (exists "CacheCDFS:Backup" ))
  99.     (
  100.  
  101.     (copyfiles
  102.         (source "CacheCDFSInst:C/BackupIDEFixInstall")
  103.         (prompt )
  104.         (help )
  105.         (infos)
  106.         (dest "CacheCDFS:")
  107.     )
  108.  
  109.     (working "\nBacking up old installation ..." )
  110.  
  111.     
  112.     ( if (NOT @pretend )
  113.        (
  114.         (if ( run "CacheCDFS:BackupIDEfixInstall CacheCDFS:Backup save" )
  115.             (
  116.             (abort)
  117.             )
  118.         )
  119.     ))
  120.     )
  121. )
  122.  
  123. (textfile
  124.     (dest  "CacheCDFS:CacheCDFSUninstall.dat" )
  125.     (append "DO NOT DELETE THIS FILE!\n"
  126.               "IT IS NEEDED TO UNINSTALL IDE-FIX '97!\n")
  127. )
  128.  
  129.  
  130. (if (exists "CacheCDFSInst:Installer" )
  131.     (
  132.     (copylib
  133.         (source "CacheCDFSInst:Installer")
  134.         (dest "SYS:Utilities")
  135.     )
  136. ))
  137.  
  138. (working "\nUpdating your System ..." )
  139.  
  140. ( if (NOT @pretend )
  141.    (
  142.     (if ( run "CacheCDFSInst:C/CopyIDELibs CacheCDFSInst:" )
  143.         (
  144.         (message "\n\nPlease reboot your Amiga and start this installation program again!" )
  145.         (makeassign "CacheCDFSInst" (safe))
  146.         (makeassign "CacheCDFS" (safe))
  147.         (exit (quiet ))
  148.         ))
  149.     )
  150. )
  151.  
  152. (copyfiles
  153.     (source "CacheCDFSInst:Register")
  154.     (prompt )
  155.     (help )
  156.     (infos)
  157.     (all)
  158.     (dest "CacheCDFS:Register")
  159. )
  160.     
  161. (tooltype
  162.     (dest "CacheCDFS:Register" )
  163.     (noposition)
  164. )
  165.  
  166. (copylib
  167.     (prompt "This will copy the FormatATAPI program to your C: directory.")
  168.     (help "This will copy the FormatATAPI program to your C: directory.")
  169.     (source "CacheCDFSInst:C/FormatATAPI")
  170.     (confirm)
  171.     (dest "C:")
  172. )
  173.  
  174. (copyfiles
  175.     (prompt "This will copy Icons for the FormatATAPI and MountLS120 programs "
  176.         "to your Harddisk.")
  177.     (help "This will copy Icons for the FormatATAPI and MountLS120 programs "
  178.         "to your Harddisk.")
  179.     (source "CacheCDFSInst:LS120")
  180.     (infos)
  181.     (all)
  182.     (confirm)
  183.     (dest "CacheCDFS:LS120")
  184. )
  185.     
  186. (copyfiles
  187.     (source "CacheCDFSInst:C/InstallLS120")
  188.     (prompt )
  189.     (help )
  190.     (infos)
  191.     (dest "CacheCDFS:")
  192. )
  193.  
  194. (protect "CacheCDFS:FindDevice" "rwed" )
  195. (protect "CacheCDFS:FindDevice.info" "rwed" )
  196.  
  197. (copylib
  198.     (prompt "\n\nCopying the FindDevice program to the "
  199.               "CacheCDFS: directory.\n" )
  200.     (source "CacheCDFSInst:FindDevice")
  201.     (dest "CacheCDFS:")
  202.     (infos)
  203.     (safe)
  204.     (help "\n\nThis will copy over the FindDevice "
  205.             "program to your CacheCDFS: directory\n\nIf you do not "
  206.             "wish the FindDevice program to be transferred to your system, "
  207.             "skip this step." )
  208. )
  209.  
  210. (tooltype
  211.     (dest "CacheCDFS:FindDevice" )
  212.     (noposition)
  213. )
  214.  
  215.  
  216.     (copyfiles
  217.         (prompt "This will copy additional documentation "
  218.             "to your Harddisk. ")
  219.         (help "This will copy additional documentation "
  220.             "to your Harddisk. ")
  221.         (source "CacheCDFSInst:Docs")
  222.         (infos)
  223.         (all)
  224.         (confirm)
  225.         (dest "CacheCDFS:Docs")
  226.     )
  227.     
  228. (tooltype
  229.     (dest "CacheCDFS:Docs" )
  230.     (noposition)
  231. )
  232.  
  233.  
  234. (if (exists "CacheCDFS:FindCD" )
  235.     (
  236.     (protect "CacheCDFS:FindCD" "rwed" )
  237.     (delete "CacheCDFS:FindCD" )
  238.     )
  239. )
  240.  
  241. (if (exists "CacheCDFS:FindCD.info" )
  242.     (
  243.     (protect "CacheCDFS:FindCD.info" "rwed" )
  244.     (delete "CacheCDFS:FindCD.info" )
  245.     )
  246. )
  247.  
  248. (if (exists "L:TandemCacheCDFS" )
  249.     (
  250.     ((set #DeleteOld
  251.         (askbool
  252.         (prompt "\n\n\"L:TandemCacheCDFS\" is present from an earlier installation."
  253.                 "\n\nDelete \"L:TandemCacheCDFS\" ?" )
  254.         (help "\n\nClick \"YES\" if \"L:TandemCacheCDFS\" should be "
  255.               "deleted and \"NO\" if not!")
  256.         (default 1)
  257.         )
  258.     ))
  259.  
  260.     (if #DeleteOld
  261.     ((protect "L:TandemCacheCDFS" "rwed" )
  262.     (delete "L:TandemCacheCDFS" )
  263.     ))
  264. ))
  265.  
  266. (if (exists "L:DemoCacheCDFS" )
  267.     (
  268.     ((set #DeleteOld
  269.         (askbool
  270.         (prompt "\n\n\"L:DemoCacheCDFS\" is present from an earlier installation."
  271.                 "\n\nDelete \"L:DemoCacheCDFS\" ?" )
  272.         (help "\n\nClick \"YES\" if \"L:DemoCacheCDFS\" should be "
  273.               "deleted and \"NO\" if not!")
  274.         (default 1)
  275.         )
  276.     ))
  277.  
  278.     (if #DeleteOld
  279.     ((protect "L:DemoCacheCDFS" "rwed" )
  280.     (delete "L:DemoCacheCDFS" )
  281.     ))
  282. ))
  283.  
  284. (if (= #Match 0)
  285.     (
  286.     (copylib
  287.         (prompt "This will copy the Ship program to your C: directory.")
  288.         (help "This will copy the Ship program to your C: directory.")
  289.         (source "CacheCDFSInst:C/Ship")
  290.         (confirm)
  291.         (dest "C:")
  292.     )
  293.  
  294.     (copylib
  295.         (prompt "This will copy the ActivateCrossIDEfix program to your C: directory.")
  296.         (help "This will copy the ActicateCrossIDEfix program to your C: directory.")
  297.         (source "CacheCDFSInst:C/ActivateCrossIDEfix")
  298.         (confirm)
  299.         (dest "C:")
  300.     )
  301.  
  302.     (startup "ActivateCrossIDEfix"
  303.         (command "ActivateCrossIDEfix ALL\n" )
  304.         (prompt "\n\nInserting ActivateCrossIDEfix into the user-startup")
  305.         (help "\n\nInserting ActivateCrossIDEfix into the user-startup")
  306.     )
  307.  
  308.     (copylib
  309.         (prompt "This will copy the MountIDE program to your C: directory.")
  310.         (help "This will copy the MountIDE program to your C: directory.")
  311.         (source "CacheCDFSInst:C/MountIDE")
  312.         (confirm)
  313.         (dest "C:")
  314.     )
  315.  
  316.     (copylib
  317.         (prompt "This will copy the ConvertDrive program to your C: directory.")
  318.         (help "This will copy the ConvertDrive program to your C: directory.")
  319.         (source "CacheCDFSInst:C/ConvertDrive")
  320.         (confirm)
  321.         (dest "C:")
  322.     )
  323.  
  324.     (copylib
  325.         (prompt "This will copy the AutoParkPrefs program to your SYS:Prefs directory.")
  326.         (help "This will copy the AutoParkPrefs program to your SYS:Prefs directory.")
  327.         (source "CacheCDFSInst:Prefs/AutoParkPrefs")
  328.         (infos)
  329.         (confirm)
  330.         (dest "SYS:Prefs")
  331.     )
  332.  
  333.     (tooltype
  334.         (dest "SYS:Prefs/AutoParkPrefs" )
  335.         (noposition)
  336.     )
  337.  
  338.     (copyfiles
  339.         (prompt "This will copy Icons for the Ship and MountIDE programs "
  340.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  341.             "SYS:WBStartUp drawer.")
  342.         (help "This will copy Icons for the Ship and MountIDE programs "
  343.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  344.             "SYS:WBStartUp drawer.")
  345.         (source "CacheCDFSInst:Harddisk")
  346.         (infos)
  347.         (all)
  348.         (confirm)
  349.         (dest "CacheCDFS:Harddisk")
  350.     )
  351.     
  352.  
  353.     (tooltype
  354.         (dest "CacheCDFS:Harddisk" )
  355.         (noposition)
  356.     )
  357.  
  358.     (user 2)
  359.  
  360.     (message "\nIMPORTANT:\n\n"
  361.                 "IDEfix and LoadIDE are installed in your C: "
  362.              "directory, but You MUST start IDEfix manually, as this program "
  363.              "will NOT alter your startup-sequence! "
  364.              "\n\nEnter \"IDEfix\" or \"LoadIDE reset\" behind SetPatch in your startup-sequence "
  365.              "to use IDEfix! "
  366.              "\n\nPlease click PROCEED now.")
  367.  
  368.     (message "\nNote:\n\nYou can use \"AutoParkPrefs\" in you SYS:Prefs directory to adjust autoparking "
  369.              "of your harddrives. Autoparking switches off the motor of a drive, if the drive is "
  370.              "not used for a certain amount of time."
  371.              "\n\nPlease click PROCEED now.")
  372.  
  373.     (message "\nNote:\n\nYou can use \"ConvertDrive\" to convert drives formatted with old controllers "
  374.              "like Apollo AT or GVP AT!\n\n"
  375.              "Enter \"ConvertDrive <device> <unit>\" from the Shell. "
  376.              "\n\nPlease click PROCEED now.")
  377.  
  378.     (message "\nNote:\n\n"
  379.              "Use \"Ship\" to park your harddisks!\n\n"
  380.              "Use \"MountIDE force\" to mount additional SyQuest cartridges!"
  381.              "\n\n\nClick PROCEED to install CD-ROMs.\n\nClick ABORT to quit.")
  382.  
  383.  
  384. ;    ( run "C:IDEfix" )
  385.     )
  386. )
  387.  
  388. (user 2)
  389.  
  390. (message "\n\nNow the FindDevice program will be launched to find "
  391.          "the Device and Unit of your CD-Rom..."
  392.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  393.          "\n\nChoose the device and unit and click \"USE\"!"
  394.          "\n\nIf FindDevice hangs: Reboot, start the installation again and "
  395.          "click CANCEL within FindDevice!")
  396.  
  397. (working "\n\nLaunching the FindDevice program to find "
  398.          "the Device and Unit of your CD-Rom..."
  399.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  400.          "\n\nChoose the device and unit and click \"USE\"!"
  401.          "\n\nIf FindDevice hangs: Reboot, start the installation again and "
  402.          "click CANCEL within FindDevice!")
  403.  
  404. (set #Product ( run "CacheCDFS:FindDevice" ( safe ) ) )
  405.  
  406.  
  407. (if (= #Product 0 )
  408.     (
  409.     ( set #CDROM_Device (getenv "CDROM_Device" ))
  410.     ( set #CDROM_Unit (+ (getenv "CDROM_Unit" )))
  411.     ( set #CDROM_NumLuns (+ (getenv "CDROM_NumLuns" )))
  412.     )
  413.  
  414.     (
  415.     ( set #CDROM_NumLuns 1)
  416.     (set #CDROM_Device
  417.         (askstring
  418.             (prompt "\n\nWhat is the name for the exec device driver? " )
  419.             (default "scsi.device" )
  420.             (help "\n\nThis is the name of the device driver to use. "
  421.                     "The name is different for different configurations. "
  422.                     "\n\nConsult the manual of your SCSI/CD-Rom host adapter "
  423.                     "if you don't know the name!" )
  424.         )
  425.     )
  426.  
  427.     (set #CDROM_Unit
  428.         (asknumber
  429.             (prompt "\n\nWhat is the Unit number of your CD-Rom drive?" )
  430.             (default 5 )
  431.             (help "\n\nThis is the unit # of the CD-Rom drive.  This is usually a "
  432.                     "numerical value between 0 and 7." )
  433.         )
  434.     )
  435.  
  436.     )
  437. )
  438.  
  439.     (set #CDROM_NumLuns
  440.         (asknumber
  441.             (prompt "\n\nHow many discs fit in your CD-Rom drive?" )
  442.             (default #CDROM_NumLuns )
  443.             (help "\nThis is the number of logical units of the CD-Rom drive. This is usually a "
  444.                     "numerical value between 1 and 8.\n\n"
  445.                     "If you have a normal CD-Rom, set this to 1.\n\n"
  446.                     "If you have a CD-Rom changer, enter the number of discs that fit in your drive!" )
  447.         )
  448.     )
  449.  
  450. (user #theirlevel)
  451.  
  452. (set #DevFlags 0)
  453.  
  454. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(telmexatapi#?|#?pcmcia#?)" ( safe ) ) )
  455.  
  456. (if (= #Match 0)
  457.     (
  458.     (set #DevFlags 1)
  459.     )
  460. )
  461.  
  462. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandem#?|#?atapi#?|oktagon#?)" ( safe ) ) )
  463.  
  464. (if (= #Match 0)
  465.     ((set #ControlDefault 2))
  466. )
  467.  
  468. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(scsi.#?|???.scsi.#?)" ( safe ) ) )
  469.  
  470. (if (= #Match 0)
  471.     ((set #ControlDefault 5))
  472. )
  473.  
  474. (if (= #CDROM_Device "gvpscsi.device")
  475.     ((set #ControlDefault 8))
  476. )
  477.  
  478.  
  479. (complete 20 )
  480.  
  481. (user 2)
  482.  
  483. (set #ControlMask 
  484.     (askoptions
  485.         (prompt "FileSystem -> Controller Configuration")
  486.         (choices "Use SCSI Direct" 
  487.                     "Use Diskchange Interrupt"
  488.                     "Use 24 Bit-DMA"
  489.                     "Use Motor off" )
  490.         (help    "Here You may define the behaviour of the CacheCDFS accessing the " 
  491.               #CDROM_Device ". If you are "
  492.                 "not sure what option is correct, leave the default settings as they "
  493.                 "are. They should work in most cases.\n"
  494.                 "These options may later be altered using the CDFSprefs program. "
  495.                 "However, wrong settings may lead to crashes if you mount the "
  496.                 "FileSystem!\n"
  497.                 "IF YOU HAVE A TANDEMCD / CD1200: YOU MUST DISABLE \"USE SCSI DIRECT\"!\n\n"
  498.  
  499.                 "\"Use SCSI Direct\"\n"
  500.                 "Choose this option if the SCSI controller using "
  501.                 #CDROM_Device " cannot handle DoIO reads with 2048 bytes sectorsize "
  502.                 "correctly (e.g. ALFII, controllers from Progressive Peripherals, Emplant).\n"
  503.                 "Do NOT choose this option if your controller is a modern, well designed "
  504.                 "SCSI controller (ALFIII, Oktagon, A2091, A3000, A4091) or if it is "
  505.                 "NO SCSI controller at all (TandemCD)!\n\n"
  506.  
  507.                 "\"Use Diskchange Interrupt\"\n"
  508.                 "Choose this option if the controller using "
  509.                 #CDROM_Device " does properly handle TD_ADDCHANGEINT and TD_REMCHANGEINT. "
  510.                 "All modern controllers should do this (ALFIII, Oktagon, TandemCD, "
  511.                 "GVP Series-II)\n"
  512.                 "Do NOT choose this option if your controller has problems with diskchange "
  513.                 "Interrupts (old ROM versions of A2091, A3000, A4091, controllers from "
  514.                 "Progressive Peripherals, Emplant)\n\n"
  515.  
  516.                 "\"Use 24 Bit-DMA\"\n"
  517.                 "Choose this option if the SCSI or CD controller using "
  518.                 #CDROM_Device " is a 24-Bit (Zorro II) DMA device "
  519.                 "(e.g. A2091 from Commodore).\n"
  520.                 "Do NOT choose this option if your controller is a 32-Bit "
  521.                 "(Zorro III) device (e.g. FastLane, A3000, A4091), or a non-DMA controller "
  522.                 "like the majority of controllers (e.g. ALFII/III, Oktagon, "
  523.                 "TandemCD, Golem, IVS TrumpCard, Supra) as it will lead to "
  524.                 "decreased performance!\n\n"
  525.  
  526.                 "\"Use Motor off\"\n"
  527.                 "Choose this option if the SCSI controller using "
  528.                 #CDROM_Device " is a GVP controller with \"Faaast\" roms.\n"
  529.                 "Do NOT choose this option if your controller is anything else."
  530.             )
  531.         (default #ControlDefault)
  532.     )
  533. )
  534.  
  535. (set #BufMemType  "1 /* MEMF_PUBLIC */\n" )
  536. (set #BufMemInt  1 )
  537.  
  538. (if (IN #ControlMask 2)
  539.     (
  540.     (set #BufMemType  "513 /* MEMF_PUBLIC|MEMF_24BITDMA */\n")
  541.     (set #BufMemInt  513 )
  542.     )
  543. )
  544.  
  545. (set #Control "\"MD=0 LC=1 DC=8 L LV AL LFC=1")
  546.  
  547.  
  548. (if (IN #ControlMask 0)
  549.     (
  550.     (set #Control (cat #Control " S"))
  551.     )
  552. )
  553.  
  554. (if (NOT (IN #ControlMask 1))
  555.     (
  556.     (set #Control (cat #Control " NC"))
  557.     )
  558. )
  559.  
  560. (if (IN #ControlMask 3)
  561.     (
  562.     (set #Control (cat #Control " M"))
  563.     )
  564. )
  565.  
  566.  
  567. (set #Control (cat #Control "\"\n"))
  568.  
  569.  
  570. (set #autoMount
  571.     (askbool
  572.         (prompt "\n\nWould you like the CD-Rom drive automatically mounted upon bootup?\n\n"
  573.                 "NOTE: If you are unsure if your controller will work correctly with "
  574.                 "the controller settings, you should select \"NO\"!" )
  575.         (help "\n\nIf you would like, the appropriate commands will be added to your user-startup file to automatically mount CacheCDFS.")
  576.         (default 1)
  577.     )
  578. )
  579.  
  580.  
  581. (if #autoMount
  582.     (set #mountDirectory "DEVS:DOSDrivers")
  583. )
  584.  
  585. (if (not #autoMount)
  586.     (set #mountDirectory "SYS:Storage/DOSDrivers")
  587. )
  588.  
  589. (complete 30 )
  590.  
  591. (user 1)
  592.  
  593. (set #tempCDDevice_NC #CDDevice_NC )
  594. (set #CDROM_ID (/ #CDROM_Unit 100 ))
  595. (set #CDROM_ID (- #CDROM_Unit (* #CDROM_ID 100 )))
  596.  
  597. (if (> #CDROM_NumLuns 1 )
  598.     (
  599.     (if
  600.     ( NOT (askbool
  601.         (prompt "\nYour CD-Rom changer has " #CDROM_NumLuns " discs.\n\n"
  602.                 "Do you wish to access them through different device names?" )
  603.         (help "\n\nClicking YES will mount every disc individually.")
  604.         (default 1)
  605.     ))
  606.     (set #CDROM_NumLuns 1 )
  607.     )
  608.     )
  609. )
  610.  
  611. (set #SlotNumber 0 )
  612.  
  613. ( until (= #CDROM_NumLuns #SlotNumber )
  614.  
  615. (set #CD_DeviceUnit (+ #CDROM_ID (* #SlotNumber 10 )))
  616. (set #CDDevice_NC (cat #tempCDDevice_NC #CD_DeviceUnit))
  617.  
  618. (user 2)
  619.  
  620. (set #CDDevice_NC
  621.     (askstring
  622.         (prompt "\n\nWhat is the name for the AmigaDOS device?\n\n"
  623.         "(The trailing colon MUST NOT be present)" 
  624.         )
  625.         (default #CDDevice_NC )
  626.         (help "\n\nThis is the name under which AmigaDOS will reference the "
  627.                 "CD-Rom as.  While usually "
  628.                 #CDDevice_NC
  629.                 ", it can be any name you choose. "
  630.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  631.     )
  632. )
  633.  
  634. (user #theirlevel)
  635.  
  636. (set #CDDevice (cat #CDDevice_NC ":") )
  637.  
  638. (if (< #wbversion 38)
  639.     ((set #startupCommand (cat "mount " #CDDevice " from devs:MountList." #CDDevice_NC "\n") )
  640.  
  641.     (if #autoMount
  642.         (
  643.  
  644.         (if (NOT (EXISTS "S:IDEfixUserStartup" ))
  645.         ((textfile
  646.             (dest "S:IDEfixUserStartup" )
  647.             (append "; IDEfix User Startup\n"
  648.                       "; © 1997 Elaborate Bytes, O. Kastl\n"
  649.                       "\n")
  650.             )
  651.         (protect "S:IDEfixUserStartup" "srwed" )
  652.         ))
  653.  
  654.         (startup "CacheCDFS"
  655.             (command "IF EXISTS S:IDEfixUserStartup\n"
  656.                      "   EXECUTE S:IDEfixUserStartup\n"
  657.                      "ENDIF\n" )
  658.             (prompt "\n\nInserting IDEfix User Startup into the user-startup")
  659.             (help "\n\nInserting IDEfix User Startup into the user-startup")
  660.         )
  661.  
  662.         (textfile
  663.         (dest "S:IDEfixUserStartup" )
  664.         (include "S:IDEfixUserStartup" )
  665.         (append #startupCommand )
  666.         )
  667.         )
  668.     )
  669.  
  670.     (if (exists (cat "devs:MountList." #CDDevice_NC ) )
  671.         ((set #ReplaceOld
  672.             (askbool
  673.             (prompt "\n\nDEVS:MountList." #CDDevice_NC" already exists!\n\n"
  674.                     "Do you want to replace it?" )
  675.             (help "\n\nClick \"YES\" if DEVS:MountList."#CDDevice_NC" should be "
  676.                   "replaced and \"NO\" if not!")
  677.             (default 1)
  678.             )
  679.         ))
  680.     )
  681.  
  682.     (if #ReplaceOld
  683.  
  684.     ((protect (cat "devs:MountList." #CDDevice_NC) "rwed" )
  685.  
  686.     (textfile
  687.         (dest (cat "devs:MountList." #CDDevice_NC) )
  688.         (append "/***************************************************************/\n"
  689.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  690.                   "/***************************************************************/\n")
  691.         (append #CDDevice "\n")
  692.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  693.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  694.         (append "    Unit           = " #CD_DeviceUnit " /* exec device unit */\n" )
  695.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  696.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  697.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  698.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  699.         (append "    MaxTransfer    = 0x1000000 /* Maximum amount of bytes for direct read */\n")
  700.         (append "    Reserved       = 0 /* Unused */\n")
  701.         (append "    Interleave     = 0 /* Unused */\n")
  702.         (append "    LowCyl         = 0 /* Unused */\n")
  703.         (append "    HighCyl        = 0 /* Unused */\n")
  704.         (append "    Surfaces       = 1 /* Unused */\n")
  705.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  706.         (append "    BufMemType     = " #BufMemType )
  707.         (append "    GlobVec        = -1 /* Do not change! */\n")
  708.         (append "    Mount          = 1 /* Mount it immediately */\n")
  709.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  710.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  711.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  712.         (append "    Control        = "#Control)
  713.         (append "   /* The Control field is for special adjustments */\n")
  714.         (append "   /* L/S convert all file names to lowercase */\n")
  715.         (append "   /* LV/S convert volume names to lowercase */\n")
  716.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  717.         (append "   /* LFC/N start converting at this character */\n")
  718.         (append "   /* LC/N/A number of blocks per cache line */\n")
  719.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  720.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  721.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  722.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  723.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  724.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  725.         (append "#\n")
  726.     )
  727.     (protect (cat "devs:MountList." #CDDevice_NC) "-e" )
  728.     )
  729.     )
  730. ))
  731.  
  732.  
  733.  
  734. (if (> #wbversion 37)
  735.     (
  736.  
  737.     (if (exists (tackon #mountDirectory #CDDevice_NC ) )
  738.         ((set #ReplaceOld
  739.             (askbool
  740.             (prompt "\n\n" (tackon #mountDirectory #CDDevice_NC) " already exists!\n\n"
  741.                     "Do you want to replace it?" )
  742.             (help "\n\nClick \"YES\" if " (tackon #mountDirectory #CDDevice_NC) " should be "
  743.                   "replaced and \"NO\" if not!")
  744.             (default 1)
  745.             )
  746.         ))
  747.     )
  748.  
  749.     (if #ReplaceOld
  750.  
  751.     ((protect (tackon #mountDirectory #CDDevice_NC) "rwed" )
  752.  
  753.     (textfile
  754.         (dest (tackon #mountDirectory #CDDevice_NC) )
  755.         (append "/***************************************************************/\n"
  756.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  757.                   "/***************************************************************/\n")
  758.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  759.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  760.         (append "    Unit           = " #CD_DeviceUnit " /* exec device unit */\n" )
  761.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  762.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  763.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  764.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  765.         (append "    MaxTransfer    = 0x1000000 /* Maximum amount of bytes for direct read */\n")
  766.         (append "    Reserved       = 0 /* Unused */\n")
  767.         (append "    Interleave     = 0 /* Unused */\n")
  768.         (append "    LowCyl         = 0 /* Unused */\n")
  769.         (append "    HighCyl        = 0 /* Unused */\n")
  770.         (append "    Surfaces       = 1 /* Unused */\n")
  771.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  772.         (append "    BufMemType     = " #BufMemType )
  773.         (append "    GlobVec        = -1 /* Do not change! */\n")
  774.         (append "    Mount          = 1 /* Mount it immediately */\n")
  775.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  776.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  777.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  778.         (append "    Control        = "#Control)
  779.         (append "   /* The Control field is for special adjustments */\n")
  780.         (append "   /* L/S convert all file/volume names to lowercase */\n")
  781.         (append "   /* LV/S convert volume names to lowercase */\n")
  782.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  783.         (append "   /* LFC/N start converting at this character */\n")
  784.         (append "   /* LC/N/A number of blocks per cache line */\n")
  785.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  786.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  787.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  788.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  789.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  790.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  791.     )
  792.  
  793.     (protect (tackon #mountDirectory #CDDevice_NC) "-e" )
  794.  
  795.     (copyfiles
  796.             (prompt "\n\nCopying Mountlist icon")
  797.             (source "CacheCDFSInst:Devs/DOSDrivers/CD0.info")
  798.             (dest #mountDirectory)
  799.             (newname (cat #CDDevice_NC ".info"))
  800.             (help "\n\nThis will copy over an icon for the mountlist file.")
  801.             (confirm)
  802.  
  803.     ))
  804.     )
  805.  
  806.     (protect "S:User-Startup" "srwed" )
  807.     (startup "CacheCDFS"
  808.         (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  809.         (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  810.                 "\"S:Startup-Sequence\" or \"S:User-Startup\" file if it is present from "
  811.                 "an earlier installation." )
  812.         )
  813.  
  814.     (if ( exists ( cat "devs:MountList." #CDDevice_NC ) )
  815.  
  816.         ((protect (cat "devs:MountList." #CDDevice_NC) "rwed " )
  817.         (delete (cat "devs:MountList." #CDDevice_NC)
  818.             (prompt "\n\nDeleting file \"DEVS:MOUNTLIST." #CDDevice_NC "\"" )
  819.             (help "\n\nThe file \"DEVS:MOUNTLIST." #CDDevice_NC "\" will be deleted "
  820.                     "if it is present from an earlier installation." )
  821.             (confirm)
  822.             )
  823.         ))
  824.     )
  825. )
  826.  
  827. (set #SlotNumber (+ #SlotNumber 1 ))
  828.  
  829. (set #doMount
  830.     (askbool
  831.     (prompt "\n\nMount " #CDDevice " now ?")
  832.     (help "Select, if your CD-Rom should be mounted now, or not.")
  833.     (default 1)
  834.     )
  835. )
  836.  
  837. ( if @pretend ((set #doMount 0))) 
  838.  
  839. (if #doMount
  840.     (
  841.     (working "\n\nMounting CD-Rom...."
  842.              "\n\nPlease Wait!")
  843.  
  844.         ( run (cat "CacheCDFSInst:KillDev " #CDDevice " Quiet"))
  845.  
  846.         (if (< #wbversion 38)
  847.             (
  848.             (run (cat "C:Mount " #CDDevice " from devs:MountList." #CDDevice_NC ))
  849.             )
  850.         )
  851.  
  852.         (if (> #wbversion 37)
  853.             (
  854.                 (run (cat "C:Mount " #CDDevice  ))
  855.             )
  856.         )
  857. ))
  858.  
  859. )
  860.  
  861. (complete 40 )
  862.  
  863. (if ( NOT (= #theirlevel 2 ) )
  864.     (
  865.     (set #instChanger ( NOT ( run "CacheCDFSInst:Changer DEVICE="#CDROM_Device" UNIT="#CDROM_Unit" TEST" ( safe ) ) ) )
  866.     )
  867. )
  868.  
  869. (if (= #theirlevel 2 )
  870.     (
  871.     (set #instChanger 1)
  872.     )
  873. )
  874.  
  875. (if #instChanger
  876.     ((set #instChanger
  877.         (askbool
  878.             (prompt "\n\nShould the ATAPI Changer utility be installed?\n\n"
  879.                       "NOTE: This program is only required, if you have an ATAPI "
  880.                       "CD-ROM changer!" )
  881.             (help "\n\nThis will copy over the ATAPI Changer utility "
  882.                     "to your harddisk.\n\nIf you do not "
  883.                     "wish the Changer program to be transferred to your system, "
  884.                     "skip this step.\n" )
  885.             (default 1)
  886.         )
  887.     )
  888. ))
  889.  
  890. (if #instChanger
  891.     (
  892.     (if (exists "CacheCDFS:AtapiChanger" )
  893.         (
  894.         (protect "CacheCDFS:AtapiChanger" "rwed" )
  895.         (delete "CacheCDFS:AtapiChanger" )
  896.         )
  897.     )
  898.  
  899.     (if (exists "CacheCDFS:AtapiChanger.info" )
  900.         (
  901.         (protect "CacheCDFS:AtapiChanger.info" "rwed" )
  902.         (delete "CacheCDFS:AtapiChanger.info" )
  903.         )
  904.     )
  905.  
  906.     (protect "CacheCDFS:Changer" "rwed" )
  907.     (protect "CacheCDFS:Changer.info" "rwed" )
  908.     (copylib
  909.         (prompt "\n\nCopying the Changer program to the "
  910.                   "CacheCDFS: directory." )
  911.         (source "CacheCDFSInst:Changer")
  912.         (dest "CacheCDFS:")
  913.         (help "\n\nThis will copy over the ATAPI Changer utility "
  914.                 "to your harddisk.\n\nIf you do not "
  915.                 "wish the Changer program to be transferred to your system, "
  916.                 "skip this step.\n" )
  917.         (infos)
  918.         (confirm)
  919.     )
  920.  
  921.     (tooltype
  922.         (dest "CacheCDFS:Changer" )
  923.         (settooltype "DEVICE" #CDROM_Device )
  924.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  925.         (noposition)
  926.     )
  927. ))
  928.  
  929. (complete 50 )
  930.  
  931. (set #instCDFSprefs
  932.     (askbool
  933.         (prompt "\n\nShould the CDFSprefs utility be installed?")
  934.         (help "\n\nThis will copy over the CDFSprefs utility "
  935.                 "to your SYS:Prefs directory\n\nIf you do not "
  936.                 "wish the CDFSprefs program to be transferred to your system, "
  937.                 "skip this step.\n" )
  938.         (default 1)
  939.     )
  940. )
  941.  
  942. (if #instCDFSprefs
  943.     ((protect "SYS:Prefs/CDFSprefs" "rwed" )
  944.     (protect "SYS:Prefs/CDFSprefs.info" "rwed" )
  945.     (copylib
  946.         (prompt "\n\nCopying the CDFSprefs program to the "
  947.                   "SYS:Prefs directory." )
  948.         (source "CacheCDFSInst:Prefs/CDFSprefs")
  949.         (dest "SYS:Prefs")
  950.         (infos)
  951.         (help "\n\nThis will copy over the CDFSprefs "
  952.                 "program to your SYS:Prefs directory\n\nIf you do not "
  953.                 "wish the CDFSprefs program to be transferred to your system, "
  954.                 "skip this step." )
  955.         (confirm)
  956.     )
  957.  
  958.     (tooltype
  959.         (dest "SYS:Prefs/CDFSprefs" )
  960.         (noposition)
  961.     )
  962. ))
  963.  
  964. (complete 60 )
  965.  
  966. (set #instKillDev
  967.     (askbool
  968.         (prompt "\n\nShould the KillDev utility be installed?")
  969.         (help "\n\nThis will copy over the KillDev utility "
  970.                 "to your CacheCDFS directory\n\nIf you do not "
  971.                 "wish the KillDev program to be transferred to your system, "
  972.                 "skip this step." )
  973.         (default 1)
  974.     )
  975. )
  976.  
  977. (if #instKillDev
  978.     ((protect "CacheCDFS:KillDev" "rwed" )
  979.     (protect "CacheCDFS:KillDev.info" "rwed" )
  980.     (copylib
  981.         (prompt "\n\nCopying the KillDev program to the "
  982.                   "CacheCDFS: directory.\n" )
  983.         (source "CacheCDFSInst:KillDev")
  984.         (dest "CacheCDFS:")
  985.         (infos)
  986.         (help "\n\nThis will copy over the KillDev "
  987.                 "program to your CacheCDFS: directory\n\nIf you do not "
  988.                 "wish the KillDev program to be transferred to your system, "
  989.                 "skip this step." )
  990.         (confirm)
  991.     )
  992.  
  993.     (tooltype
  994.         (dest "CacheCDFS:KillDev" )
  995.         (settooltype "DOSDEV" #CDDevice )
  996.         (noposition)
  997.     )
  998. ))
  999.  
  1000. (if #instEject
  1001.     (
  1002.     (set #instEject
  1003.     (askbool
  1004.         (prompt "\n\nShould the Eject utility be installed?")
  1005.         (help "\n\nThis will copy over the Eject utility "
  1006.                 "to your CDFS directory\n\nIf you do not "
  1007.                 "wish the Eject program to be transferred to your system, "
  1008.                 "skip this step.\n" )
  1009.         (default 1)
  1010.     )
  1011.     ))
  1012. )
  1013.  
  1014. (if #instEject
  1015.     ((protect "CacheCDFS:Eject" "rwed" )
  1016.     (protect "CacheCDFS:Eject.info" "rwed" )
  1017.     (copylib
  1018.         (prompt "\n\nCopying Eject program to the "
  1019.                   "CacheCDFS: directory.\n" )
  1020.         (source "CacheCDFSInst:Eject")
  1021.         (dest "CacheCDFS:")
  1022.         (help "\n\nThis will copy over the Eject utility "
  1023.                 "to your CacheCDFS directory\n\nIf you do not "
  1024.                 "wish the Eject program to be transferred to your system, "
  1025.                 "skip this step.\n" )
  1026.         (infos)
  1027.         (confirm)
  1028.     )
  1029.  
  1030. ))
  1031.  
  1032. (complete 70 )
  1033.  
  1034.  
  1035. (if #instEjectCD
  1036.     (
  1037.     (set #instEjectCD
  1038.     (askbool
  1039.         (prompt "\n\nShould the EjectCD utility be installed?")
  1040.         (help "\n\nThis will copy over the EjectCD utility "
  1041.                 "to your CDFS directory\n\nIf you do not "
  1042.                 "wish the EjectCD program to be transferred to your system, "
  1043.                 "skip this step.\n" )
  1044.         (default 1)
  1045.     )
  1046.     ))
  1047. )
  1048.  
  1049. (if #instEjectCD
  1050.     ((protect "CacheCDFS:EjectCD" "rwed" )
  1051.     (protect "CacheCDFS:EjectCD.info" "rwed" )
  1052.     (copylib
  1053.         (prompt "\n\nCopying EjectCD program to the "
  1054.                   "CacheCDFS: directory.\n" )
  1055.         (source "CacheCDFSInst:EjectCD")
  1056.         (dest "CacheCDFS:")
  1057.         (help "\n\nThis will copy over the EjectCD utility "
  1058.                 "to your CacheCDFS directory\n\nIf you do not "
  1059.                 "wish the EjectCD program to be transferred to your system, "
  1060.                 "skip this step.\n" )
  1061.         (infos)
  1062.         (confirm)
  1063.     )
  1064.  
  1065.     (tooltype
  1066.         (dest "CacheCDFS:EjectCD" )
  1067.         (settooltype "DEVICE" #CDROM_Device )
  1068.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  1069.         (noposition)
  1070.     )
  1071. ))
  1072.  
  1073. (set #instPlayCD 0)
  1074.  
  1075. (if (exists "CacheCDFSInst:PlayCD.lha")
  1076.  
  1077. ((set #instPlayCD
  1078.     (askbool
  1079.         (prompt "\n\nShould the PlayCD Audio Player be installed?")
  1080.         (help "\n\nThis will copy over the PlayCD drawer "
  1081.                 "to your CacheCDFS directory\n\nIf you do not "
  1082.                 "wish the PlayCD drawer to be transferred to your system, "
  1083.                 "skip this step." )
  1084.         (default 1)
  1085.     )
  1086. )))
  1087.  
  1088. (if #instPlayCD
  1089.     (
  1090.  
  1091.     (working "\n\nDecrunching PlayCD...."
  1092.              "\n\nPlease Wait!")
  1093.  
  1094.     ( if (NOT @pretend )
  1095.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:PlayCD.lha" )
  1096.         (
  1097.         (abort "\n\nUnable to decrunch PlayCD!")
  1098.         )
  1099.     )))
  1100.  
  1101.  
  1102.     (tooltype
  1103.         (dest "CacheCDFS:PlayCD/PlayCD" )
  1104.         (settooltype "DEVICE" #CDROM_Device )
  1105.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  1106.         (settooltype "BUFMEMTYPE" ("%ld" #BufMemInt ))
  1107.     )
  1108.     )
  1109. )
  1110.  
  1111. (complete 80 )
  1112.  
  1113.  
  1114. (set #instJukebox 0)
  1115.  
  1116. (if (exists "CacheCDFSInst:JukeBox.lha")
  1117. ((set #instJukebox
  1118.     (askbool
  1119.         (prompt "\n\nShould the JukeBox Audio Player be installed?")
  1120.         (help "\n\nThis will copy over the JukeBox drawer "
  1121.                 "to your CacheCDFS directory\n\nIf you do not "
  1122.                 "wish the JukeBox drawer to be transferred to your system, "
  1123.                 "skip this step." )
  1124.         (default 1)
  1125.     )
  1126. )))
  1127.  
  1128. (if #instJukebox
  1129.     (
  1130.     (protect "CacheCDFS:JukeBox" "rwed" )
  1131.     (protect "CacheCDFS:JukeBox.info" "rwed" )
  1132.     (makedir "CacheCDFS:JukeBox" 
  1133.         (infos)
  1134.         (prompt "\n\nCreating drawer for JukeBox\n")
  1135.         (help "\n\nThis will create a drawer for the JukeBox "
  1136.                 "Audio Player." )
  1137.     )
  1138.  
  1139.  
  1140. (working "\n\nDecrunching Jukebox...."
  1141.          "\n\nPlease Wait!")
  1142.  
  1143.     ( if (NOT @pretend )
  1144.     (( if ( run "CacheCDFSInst:c/lhex -qafFw=CacheCDFS:Jukebox e CacheCDFSInst:JukeBox.lha" )
  1145.         (
  1146.         (makeassign "JukeBox")
  1147.         (abort "\n\nUnable to decrunch JukeBox!")
  1148.         )
  1149.     )))
  1150.  
  1151.  
  1152.     (tooltype
  1153.         (dest "CacheCDFS:Jukebox/JukeBox" )
  1154.         (settooltype "DEVICE" #CDROM_Device )
  1155.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  1156.     )
  1157.  
  1158. ))
  1159.  
  1160.  
  1161. (if (AND (> #wbversion 38) (exists "CacheCDFSInst:CD32.lha"))
  1162.  
  1163.     ((complete 90 )
  1164.  
  1165.     (set #instCD32
  1166.         (askbool
  1167.             (prompt "\n\nShould the CD32-Emulator be installed?"
  1168.                     "\n\nNote that the CD32-Emulator is completely useless "
  1169.                     "if you don't have an Amiga with AA/AGA chipset and "
  1170.                     "at least Kickstart version 3.0!")
  1171.             (help "\n\nThis will copy over the CD32 drawer "
  1172.                     "to your CacheCDFS directory\n\nIf you do not "
  1173.                     "wish the CD32 drawer to be transferred to your system, "
  1174.                     "skip this step.")
  1175.             (default 1)
  1176.         )
  1177.     )
  1178.  
  1179.     (if #instCD32
  1180.         (
  1181.         (working "\n\nDecrunching CD32...."
  1182.                  "\n\nPlease Wait!")
  1183.  
  1184.         ( if (NOT @pretend )
  1185.         (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:CD32.lha" )
  1186.             (
  1187.             (abort "\n\nUnable to decrunch CD32!")
  1188.             )
  1189.         )))
  1190.  
  1191.     
  1192.         (if (exists "CacheCDFSInst:CD32" )
  1193.             ((copylib
  1194.                 (prompt "This will copy the CD32 program.")
  1195.                 (help "This will copy the CD32 program.")
  1196.                 (source "CacheCDFSInst:CD32")
  1197.                 (infos)
  1198.                 (dest "CacheCDFS:CD32")
  1199.                 (confirm)
  1200.             ))
  1201.         )
  1202.  
  1203.  
  1204.         ( set #CDROM_Blocks 2 )
  1205.  
  1206.         (if (= #CDROM_Device "tandemcd.device")
  1207.             (
  1208.             ( set #CDROM_Blocks 4 )
  1209.             )
  1210.         )
  1211.  
  1212.         (if (= #CDROM_Device "tandemat.device")
  1213.             (
  1214.             ( set #CDROM_Blocks 4 )
  1215.             )
  1216.         )
  1217.  
  1218.         (if (= #CDROM_Device "tandemcd_pcmcia.device")
  1219.             (
  1220.             ( set #CDROM_Blocks 4 )
  1221.             )
  1222.         )
  1223.  
  1224.         (if (= #CDROM_Device "tandemcd_come.device")
  1225.             (
  1226.             ( set #CDROM_Blocks 4 )
  1227.             )
  1228.         )
  1229.  
  1230.         (tooltype
  1231.             (dest "CacheCDFS:CD32/CD32" )
  1232.             (settooltype "BLOCKS" ("%ld" #CDROM_Blocks ) )
  1233.             (settooltype "DOSDEV" #CDDevice_NC)
  1234.             )
  1235.  
  1236.     ))
  1237. ))
  1238.  
  1239. (complete 100 )
  1240.  
  1241.  
  1242. (makeassign "CacheCDFSInst" (safe))
  1243. (makeassign "CacheCDFS" (safe))
  1244.  
  1245.